package com.zuoluo.dp.strategy;

public class Cat implements java.lang.Comparable<Cat>{
	private int height;
	private int weight;
	private CatHeightCompare catHC = new CatHeightCompare();
	
	public Cat(int height, int weight) {
		this.height = height;
		this.weight = weight;
	}
	public int getHeight() {
		return height;
	}
	public void setHeight(int height) {
		this.height = height;
	}
	public int getWeight() {
		return weight;
	}
	public void setWeight(int weight) {
		this.weight = weight;
	}
	
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return height + "|" + weight;
	}
	
	@Override
	public int compareTo(Cat o) {
		return catHC.compare(o, this);
	}
}
